# !/bin/bash
# check_tcp_port_connections.sh
# Useage: ./check_tcp_port_connections.sh 192.168.0.150:80 LAST-ACK
# yinqinghong.cn 201504091627

ss -nt |awk '{ if($4=="'$1'") ++stat[$1]} END { if( "'$2'" in stat ) {print stat["'$2'"]} else {print 0}}'

